package homework;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-07-25
 * Time: 9:21
 */
class MyThread1 extends Thread{
    @Override
    public void run() {
        System.out.println("111");
    }
}
class MyThread2 implements Runnable {
    @Override
    public void run() {
        System.out.println(111);
    }
}
public class H230723 {
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            System.out.println("111");
        });
        thread.start();
    }
    public static void main4(String[] args) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(111);
            }
        });
        thread.start();
    }
    public static void main3(String[] args) {
        Thread thread =new Thread() {
            @Override
            public void run() {
                System.out.println(111);
            }
        };
        thread.start();
    }
    public static void main2(String[] args) {
        MyThread2 myThread2 = new MyThread2();
        Thread thread = new Thread(myThread2);
        thread.start();
    }
    public static void main1(String[] args) {
        MyThread1 myThread1 = new MyThread1();
        myThread1.start();
    }

}
